package com.zs.blog.config;

import com.zs.blog.interceptor.LoginInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Title: WebConfig
 * @Author zs
 * @Package com.zs.blog.config
 * @Date 2025/4/17 22:16
 * @description: Web配置
 */
//@Configuration
public class WebConfig implements WebMvcConfigurer {

    public LoginInterceptor loginInterceptor;

    public WebConfig(LoginInterceptor loginInterceptor){
        this.loginInterceptor = loginInterceptor;
    }

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
//        /user/login","/user/register","/v3/api-docs","/swagger-ui/**","/swagger-ui.html
//        registry.addInterceptor(loginInterceptor).
//                excludePathPatterns("/**");
    }
}
